/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import Bean.MeasureData;
import Bean.Phenomenon;
import Bean.Vineyard;
import dao.interfacce.AgronomousDAO;
import dao.interfacce.AgronomousDAO_DB;
import dao.interfacce.OenologistDAO;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Vincenzo
 */
public class VineryManager {

    private AgronomousDAO adao;
    private OenologistDAO odao;


    public VineryManager(String connectionURL, String username, String password) throws Exception{
       adao= new AgronomousDAO_DB(connectionURL, username, password);
    }



    public List<MeasureData> monitoringParameter(int v_id) {
        return adao.monitoringParameters(v_id);
    }

    public List<MeasureData> monitoringParameter(int v_id, Date data_in, Date data_out){
        return adao.monitoringParameters(v_id, data_in, data_out);
    }

    public List<Phenomenon> monitoringEvents(int v_id){
       return adao.monitoringEvents(v_id);
    }

    public List<Phenomenon> monitoringEvents(int v_id, Date data_in, Date data_out){
       return adao.monitoringEvents(v_id, data_in, data_out);
    }

    public Vineyard infoVineyard(int v_id){
      return adao.infoVineyard(v_id);
    }



}
